package org.example.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.example.entity.PubCenter;
import org.example.mapper.PubCenterMapper;
import org.example.service.PubCenterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName PubCenterServiceImpl
 * @Description TODO
 * @Author lipeijin
 * @Date 2025年08月14日 下午7:58
 * @Version 1.0
 */
@Service
public class PubCenterServiceImpl implements PubCenterService {
    @Autowired
    private PubCenterMapper pubCenterMapper;

    @Override
    public PageInfo<PubCenter> getPage(int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<PubCenter> pubCenters = pubCenterMapper.getPage();
        PageInfo<PubCenter> pageInfo = new PageInfo<>(pubCenters);
        return pageInfo;
    }

}
